package cn.wei.example.consumer;

import cn.wei.example.common.model.User;
import cn.wei.example.common.service.UserService;
import cn.wei.youvierpc.proxy.ServiceProxyFactory;

public class EasyConsumerExample {
    public static void main(String[] args) {
//        UserService userService = new UserServiceProxy();
        UserService userService = ServiceProxyFactory.getProxy(UserService.class);
        User user = new User();
        user.setName("youvie");

        User resultUser = userService.getUser(user);

        if (resultUser != null) {
            System.out.println(resultUser.getName());
        } else {
            System.out.println("结果为null");
        }

    }
}
